import request from "@/utils/request";

// 获得店长绩效考核分页
export function getPerformancePage(query) {
  return request({
    url: "/store/performance/page",
    method: "get",
    params: query,
  });
}

// 创建店长绩效考核
export function CreatePerformancePage(data) {
  return request({
    url: "/store/performance/create",
    method: "post",
    data: data,
  });
}

// 更新店长绩效考核
export function UpdatePerformancePage(data) {
  return request({
    url: "/store/performance/update",
    method: "put",
    data: data,
  });
}

// 获得店长绩效考核
export function getPerformancePageInfo(query) {
  return request({
    url: "/store/performance/get",
    method: "get",
    params: query,
  });
}

// 删除店长绩效考核
export function delPerformancePage(query) {
  return request({
    url: "/store/performance/delete",
    method: "delete",
    params: query,
  });
}

// 下载绩效考核导入模板
export function DownTemplate(query) {
  return request({
    url: "/store/performance/down/template",
    method: "get",
    params: query,
    responseType: "blob",
  });
}

// 导入绩效考核
export function ImportPerformancePage(query) {
  return request({
    url: "/store/performance/import",
    method: "post",
    params: query,
  });
}

// 导入绩效考核查询完成状态
export function getFinishState(query) {
  return request({
    url: "/store/performance/import/finish",
    method: "get",
    params: query,
  });
}

// 导入绩效考核回执下载
export function ImportFinishDown(query) {
  return request({
    url: "/store/performance/import/finish/down",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
